/*************************************************************************
> File Name: cite_03.cpp
> Author: hzy
> Created Time: 2023-08-08 11:38:14
> Description: 指针的引用
************************************************************************/
#include <iostream>

using namespace std;

int main()
{
    int a = 10;
    int b = 20;

    int *p = &a;
    int *(&q) = p;      /* （*(&q)中的括号可以省略） 对int * 类型的指针变量p 引用为int *类型指针变量q */

    cout << "*q = " << *q << ", *p = " << *p << endl;
    q = &b;
    cout << "*q = " << *q << ", *p = " << *p << endl;

    return 0;
}